// 公积金差额
import expandRow from './table-expand.vue'
export const ProvidentFundThead = [
  {
    title: '费用月份',
    key: 'feeDate',
    width: 100,
    render: (h, params) => {
      const month = params.row.periodMonth < 10 ? '0' + params.row.periodMonth : params.row.periodMonth
      const text = params.row.periodYear + '' + month
      return h('span', text)
    }
  },
  {
    title: '公积金编号',
    key: 'insureNo'
  },
  {
    title: '公积金差额',
    key: 'total',
    render: (h, params) => {
      const text = params.row.shouldTotal + '(' + params.row.total + ')'
      return h('span', text)
    }
  },
  {
    title: '展开',
    type: 'expand',
    key: 'expand',
    // slot: 'action',
    fixed: 'right',
    width: 70,
    render: (h, params) => {
      return h(expandRow, {
        props: {
          row: params.row
        }
      })
    }
  }
]

// 展开表格
export const ProvidentFundChildrenThead = [
  {
    title: '费用月份',
    key: 'feeDate',
    tooltip: true
  },
  {
    title: '公积金编号',
    key: 'insureNo',
    tooltip: true
  },
  {
    title: '客户名称',
    key: 'companyName',
    tooltip: true
  },
  {
    title: '公积金差额',
    key: 'total',
    tooltip: true,
    render: (h, params) => {
      const text = params.row.shouldTotal + '(' + params.row.total + ')'
      return h('span', text)
    }
  }
]
